//会员倒计时
function daojishi() {
    clearInterval(timer);
    var nowtime = Date.parse(new Date());
    if((starttime*1000) > nowtime){
        clearInterval(timer);
        $('.countdown').html('本周比赛未开始，敬请期待！');
    }else if((endtime*1000) < nowtime){
        clearInterval(timer);
        $('.countdown').html('本周比赛已结束');
    }else{
        var leftTime = (endtime * 1000 - nowtime) / 1000;
        var day = Math.floor(leftTime / 60 / 60 / 24); //计算剩余的天数
        var hours = Math.floor(leftTime / 60 / 60 % 24); //计算剩余的小时
        var minutes = Math.floor(leftTime / 60 % 60);//计算剩余的分钟
        var seconds = Math.floor(leftTime % 60);//计算剩余的秒数
        msg = "<span>" + day + "</span>" + "<span>天</span>" + "<span>" + hours + "</span>" + "<span>小时</span>" + "<span>" + minutes + "</span>" + "<span>分</span>" + "<span>" + seconds + "</span>" + "<span>秒</span>";
        $('.countdown').html("距离本周结束:" + msg);
        timer = setInterval("daojishi()", 1000);
    }
}